import React, { Component } from 'react'

export default class A extends Component {
  handleClick = () => {
    // #3 在 A 组件调用父亲的方法并传递数据
    this.props.changeCount(1)
  }
  render() {
    return (
      <div>
        A:<button onClick={this.handleClick}>+1</button>
      </div>
    )
  }
}
